<template>
	<el-card>
		<el-config-provider>

			<el-table :data="tableData">
				<el-table-column prop="date" label="Date" width="150" />
				<el-table-column label="Delivery Info">
					<el-table-column prop="name" label="Name" width="120" />
					<el-table-column label="Address Info">
						<el-table-column prop="state" label="State" width="120" />
						<el-table-column prop="city" label="City" width="120" />
						<el-table-column prop="address" label="Address" />
						<el-table-column prop="zip" label="Zip" width="120" />
					</el-table-column>
				</el-table-column>
				<el-table-column width="80">
					<template #default="scope">
						<div class="demo-image__preview">
							<el-image style="width: 100px; height: 100px;" :src="url" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2" :preview-src-list="srcList" :initial-index="0" fit="cover" />
						</div>
					</template>
				</el-table-column>
			</el-table>
			<el-pagination :total="100" />
		</el-config-provider>
	</el-card>
</template>

<script lang="ts" setup>
import TableToolbar from '@/components/table-toolbar'

const url =
	'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'

const srcList = [
	'https://youimg1.c-ctrip.com/target/010341200061sysx2A203_D_10000_1200.jpg',
	'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
	'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
	'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
	'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
	'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
	'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg',
]

const tableData = [
	{
		date: '2016-05-03',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	},
	{
		date: '2016-05-02',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	},
	{
		date: '2016-05-04',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	},
	{
		date: '2016-05-01',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	},
	{
		date: '2016-05-08',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	},
	{
		date: '2016-05-06',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	},
	{
		date: '2016-05-07',
		name: 'Tom',
		state: 'California',
		city: 'Los Angeles',
		address: 'No. 189, Grove St, Los Angeles',
		zip: 'CA 90036'
	}
]
</script>

<style scoped>

.demo-image__preview {
	width: 50px;
	height: 50px;
	overflow: hidden;
	border-radius: 50%;
	z-index: 999;
	background-color: #fefefe;
	margin: auto;
}

.demo-image__error .image-slot {
	font-size: 30px;
}

.demo-image__error .image-slot .el-icon {
	font-size: 30px;
}

.demo-image__error .el-image {
	width: 100%;
	height: 200px;
}
</style>
